const express = require('express')
const path = require('path')
const app = express()

app.set('view engine', 'ejs')   //设置模板引擎
app.set('views', path.join(__dirname, 'views'))     //设置模板文件存放的目录

app.get('/', (req, res) => {
  res.render('home',{title:'有很多人都在笑着。'})  
})

app.listen(3000, () => {
  console.log('runnning at http://localhost:3000')
})